import { Router, Route, Switch } from 'react-router-dom'
import AuthRoute from '@/components/AuthRoute'
import './App.scss'

import Layout from './pages/Layout'
import Login from './pages/Login'
import history from './utils/history'

const App = () => {
  return (
    <div className="app">
      <Router history={history}>
        <Switch>
          <Route exact path="/login" component={Login} />
          <AuthRoute path="/" component={Layout} />
        </Switch>
      </Router>
    </div>
  )
}

export default App